package action.cart;

import java.util.ArrayList;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import org.apache.struts2.ServletActionContext;

import vo.CartVO;

public class RemoveAllCartAction {
	
	@SuppressWarnings("unchecked")
	public String execute() {
		HttpServletRequest request = ServletActionContext.getRequest();
		HttpSession session = request.getSession();
		ArrayList<CartVO> cart = (ArrayList<CartVO>) session.getAttribute("cart");
		
		cart.clear();
		
		int sumprice = 0;
		session.setAttribute("sumprice", sumprice);
		return "success";
	}

}
